CC = g++
CFLAGS = -Wall
LINK = -lglut -lGL
TARGET = ./snake

SRCS = $(wildcard *.cpp)
OBJS = $(patsubst %cpp,%o,$(SRCS))

all:$(TARGET)
	
$(TARGET):$(OBJS)
	$(CC) $(OBJS) $(CFLAGS) $(LINK) -o $(TARGET)

%.o:%.cpp
	$(CC) $(CFLAGS) $(LINK) -c $<

.PHONY:clean
clean:
	rm -rf $(OBJS) $(TARGET)
